home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-01-04 | 1.5 KB | 76 lines | [TEXT/TEXT] |
- label sample
- prompt 'hi there'
- return
-
-
- '' 'a set of procedures to plot ternary diagrams'
- '' 'the table must be at least 5 columns wide'
- '' 'with the fractions of end members A, B, C, in columns 1, 2, 3'
- '' 'columns 4 and 5 are used, so dont put data in them'
- '' 'plot-triange draws the triangle on the graphics screen'
- '' 'plot-ternary recomputes C and plots the data'
- '' 'pick activated the cursor and prints out A,B,C values'
-
-
- label plot-triangle
- '' 'requires 4 extra rows in the table and space for 3 variables'
- setvar saverows @rows
- setvar savecols @cols
- setvar saveint @interpolated
- insert row 1 4
- rows 4
- cols 5
- table 1 1 1
- table 1 2 0
- table 2 1 0
- table 2 2 1
- table 3 1 0
- table 3 2 0
- table 4 1 1
- table 4 2 0
- execute plot-ternary
- clear
- plot 4 5
- vm @saverows + 4 = saverows
- rows @saverows
- delete row 1 4
- cols @savecols
- interpolated @saveint
- delete variable saverows
- delete variable savecols
- delete variable saveint
- return
-
- label plot-ternary
- '' 'optional first argument is plotting symbol (default is stars)'
- if @arg1 s= ''
- setvar arg1 stars
- xaxis 0 1
- yaxis 0 1
- constant 1 3
- cmath 3 - 2 = 3
- cmath 3 - 1 = 3
- cmath 1 /# 2 = 4
- cmath 3 + 4 = 4
- cmath 1 *# 0.866 = 5
- plot 4 5 @arg1
- return
-
- label pick
- prompt 'use the abort menu to terminate this routine'
- for i 1 100
- cursor 'pick a point'
- vmath @ypos / 0.866 = a
- vmath @a / 2 = ao2
- vmath @xpos - @ao2 = c
- vmath @a + @c = b
- vmath 1 - @b = b
- prompt ' a = ' @a
- prompt ' b = ' @b
- prompt ' c = ' @c
- next i
- return
-
-
-
-